/*
 PureMVC AS3 / Flex Demo - Slacker 
 Copyright (c) 2008 Clifford Hall <clifford.hall@puremvc.org>
 Your reuse is governed by the Creative Commons Attribution 3.0 License
 */
package mvc.view
{
	import flash.events.Event;
	import mx.events.FlexEvent;

	import mvc.view.components.ContactView;
	import org.puremvc.as3.patterns.mediator.Mediator;

	public class ContactViewMediator extends Mediator
	{
        public static const NAME:String = 'ContactViewMediator';
        public function ContactViewMediator( viewComponent:Object ){super( NAME, viewComponent );}
		override public function onRegister():void
		{
//			contactView.message.htmlText = "<b>Hello</b> from the newly registered "+NAME+"	=)";
			contactView.addEventListener(FlexEvent.HIDE, onHide);
		}
		protected function onHide(event:Event):void
		{
//			contactView.message.text = "Hi there, its your old friend "+NAME+"	=)";
			contactView.removeEventListener(FlexEvent.HIDE, onHide);
		}   
        protected function get contactView():ContactView{return viewComponent as ContactView;}
	}
	
}